package com.wxq.dbtest.mongodb.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Id;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;

@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Data
@ToString
@EqualsAndHashCode
public class Student implements Serializable {

    @Id
    /**
     * 学生id
     */
    private Integer studentId;
    /**
     * 学生名
     */
    private String studentName;
    /**
     * 老师名
     */
    private String teacherName;
    /**
     * 学生年龄
     */
    private Integer studentAge;
    /**
     * 学生生日
     */
 //   @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date studentBirthday;
    /**
     * 其它信息
     */
    private Map<String,Object> data;
}
